﻿using Infrastructure.AggregateBase;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Domain.Model
{
    [Table("RecommendList")]
    public class RecommendListAggregate : AggregateRoot<RecommendListAggregate, int>
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public override int ID { get; set; }
        public int TaskID { get; set; }
        /// <summary>
        /// 上推荐结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
        public int UserID { get;  set; }
        [ForeignKey("TaskID")]
        public virtual TaskAggregate TaskAggregate { get; set; }
        /// <summary>
        /// 是否用户支付上推荐
        /// </summary>
        public bool IsPay { get;  set; }
        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string Remark { get;  set; }
        /// <summary>
        /// 推荐时间排序 默认为加入时间 ，或设置为至顶到指定时间
        /// </summary>
        public DateTime SetTime { get; set; }
    }
}
